CXX= mpicxx
CFLAGS = -O3 -std=c++17 -fopenmp -g -DTEST_CNT=10

CL = mpicxx
LFLAGS = -lm -fopenmp -ldl

all: my_IJ_k64p64.exe my_IJ_k64p32.exe

my_parcsr.o: my_parcsr.cpp
	$(CXX) $(CFLAGS) -c $^ -o $@

my_IJ_k64p64.o: my_IJ.cpp 
	$(CXX) -DKSPBIT=64 -DPCBIT=64 $(CFLAGS) -c $^ -o $@

my_IJ_k64p32.o: my_IJ.cpp 
	$(CXX) -DKSPBIT=64 -DPCBIT=32 $(CFLAGS) -c $^ -o $@

my_IJ_k64p64.exe: my_IJ_k64p64.o my_parcsr.o
	$(CXX) $^ $(LFLAGS) -o $@

my_IJ_k64p32.exe: my_IJ_k64p32.o my_parcsr.o
	$(CXX) $^ $(LFLAGS) -o $@

default: all
.PHONY: all clean

clean:
	rm *.o *.exe

